//
//  CustomViewModel.m
//  didacar
//
//  Created by Yang Yuexia on 15/12/11.
//  Copyright © 2015年 dzmmac. All rights reserved.
//

#import "CustomViewModel.h"
#import "InitiateCustomModel.h"
#import "RequestCustomModel.h"
#import "UserInfoManager.h"
#import "UserInfoModel.h"
@implementation CustomViewModel

-(id)init{
    self.requestCustomModel = [[RequestCustomModel alloc ] init];
    return [super init];
}

/**
 *  发起定制
 *
 *  @param resultBlock 回调
 */
-(void)initiateCustom:(DealDataResultBlock)resultBlock
{
//    self.requestCustomModel.MemberId = USERINFOManager.getUserInfo.MemberId;
    WEAKSELF
    [[BaseHttpRequest sharedInstance] sendRequestToPost:InitiateCustom withData:self.requestCustomModel alertMessage:@"" success:^(NSDictionary *dicData) {
        
        weakSelf.initiateCustomModel = [[InitiateCustomModel alloc] initWithDictionary:dicData];
        resultBlock(1,weakSelf.initiateCustomModel,nil);
        
    } error:^(NSString *errorMsg) {
        resultBlock(0,nil,errorMsg);
    }];
}




@end
